Quick Tutorial on hacking compressed palettes

Assuming you're hacking a compressed battle palette:

Get to the battle scene in VBA. Go to tools and to the OAM viewer. Scroll through the sprites
until you see a piece of the battle sprite whose palette you want to hack, and look at the data
underneath.

Next to "Pal:" should be a number. Memorize it, and go to Tools -> Palette Viewer. On the right
half of the resulting window will be a 16x16 grid labeled "Sprite palette" or something. Now,
each row is a palette. The first row is palette 0. Assuming the OAM viewer told you to look for
palette 9 (as in my case), you would go to the [b]tenth[/b] row (you must count the first row as
palette 0). Click on the first box of this row.

You should see an address appear denoting the location of that box's 16 bit color data appear in
the...lower left, IIRC. Go to Tools -> Memory Viewer (you should set this one to a hotkey such as
Ctrl+M, because the memory viewer is the sexiest thing about VBA) and go to the address that the
palette viewer gave you. In my case, it was x5000320.

When you get here, you'll see 32 bytes of data that all look like 16 bit color values. If they
don't look like 16 bit color values, it's because you and palette data aren't well enough
acquainted. Get acquainted, then click on the first byte to make the address 0x5000320
(or whatever it may be) appear in the lower right of the memory viewer window. Now click "save",
and the address will be loaded into the first input box of the save window, denoting that you are
saving from that address. In the input box below, type in "20", because 20 is hex for 32, which
is the size in bytes of the data you are saving. Name it whatever you want and save.

Now, open the palette you dumped with a hex editor and resave it with the extension "raw". Open
unLZ GBA (you'd better have this if you want to work with compressed data) and open a rom (it
actually doesn't matter which rom, just open one...as long as it has some compressed data in it
and is 16 megabytes in size, it'll work). Click File -> LoadRAW, and select the file you resaved
as a .raw. Click the Write to ROM button on the right side of unLZ, and the next window that pops
up will have some options. Leave them as they are, except change the address that you see in the
top right input box from whatever it is to "0x1000000". Click OK, and the data you loaded will be
saved to the end of the rom in compressed form.

Open the rom you stored the compressed data to in a hex editor and cut or copy the part you just
added. Open the rom that has the palette you are trying to compress if it isn't the same one (I
don't know why you'd use a different rom to write the compressed data to except to show off that
you can) and search for the data you copied. If you still don't find it, you did something wrong,
or the data is part of a larger chunk of compressed data. However, the battle palette I hacked in
that example (I hacked it while it was still compressed, so don't tell me it's not sexy) was also
part of a larger chunk of compressed data, and I still found a match. If you also find a match,
you can go into unLZ and get as close to the address you found the compressed data at as you can.
From there, you can use rawdumping and loading to edit the compressed palettes, and search for
the address that the compressed data is stored at to find the pointer table for it.

That wasn't as quick of a tutorial as I had hoped it would be...v_v
